<?php
/**
 * 贴纸查询
 */
require_once dirname(dirname(__DIR__))."/common.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\model\UserVideo;

$music_id=$_REQUEST['music_id'];
if(empty($music_id)){
    Response::output(-1,"缺少参数");
}
//分页
$page = isset($_REQUEST["page"]) ? intval($_REQUEST["page"]) : 1;
$page = $page > 0 ? $page : 1;
$pageSize = 10;

//实例化数据库
$db = SysResource::getDB(false);
$UserVideo=new UserVideo($db);
$res=$UserVideo->music($music_id,$page,$pageSize);
if(!empty($res)){
    Response::output(0,"查询成功",$res,count($res));
}else{
    Response::output(0,"查询成功",[]);
}